
public class Test01 {
	
	public static void main(String[] args) {
		//1 1 2 3 5 8 13 21
		int n = 5;
		int[] dp = new int[n];
		if(n <= 2) {
			System.out.println(1);
		}
		else {
			dp[0] = 1;
			dp[1] = 1;
			for (int i = 0; i < dp.length; i++) {
				dp[i] = dp[i-1] + dp[i-2];
			}
		}
		System.out.println(dp[dp.length-1]);
		
		System.out.println(f(7));

		
	}
	
	public static int f(int n) {
		if(n == 1 || n == 2) {
			return 1;
		}
		else {
			return f(n-1) + f(n-2);
		}
	}
	

}
